const list = {
  1: {
    name: '金华移动访客系统',
    H5Url: 'http://www.96time.cn/visitorH5?state=1a0a0',
    publicUrl: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx3f0d22136091bb20&redirect_uri=http://www.96time.cn/visitorH5&response_type=code&scope=snsapi_userinfo&wechat_redirect&state=1a0a0'
  },
  2: {
    name: '金华电信访客系统',
    H5Url: 'http://www.96time.cn/visitorH5?state=2a0a0',
    publicUrl: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx3f0d22136091bb20&redirect_uri=http://www.96time.cn/visitorH5&response_type=code&scope=snsapi_userinfo&wechat_redirect&state=2a0a0'
  },
  3: {
    name: '江南中学访客系统',
    H5Url: 'http://www.96time.cn/visitorH5?state=3a0a0',
    publicUrl: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx3f0d22136091bb20&redirect_uri=http://www.96time.cn/visitorH5&response_type=code&scope=snsapi_userinfo&wechat_redirect&state=3a0a0'
  },
  4: {
    name: '金东区电信访客系统',
    H5Url: 'http://www.96time.cn/visitorH5?state=4a0a0',
    publicUrl: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx3f0d22136091bb20&redirect_uri=http://www.96time.cn/visitorH5&response_type=code&scope=snsapi_userinfo&wechat_redirect&state=4a0a0'
  },
  5: {
    name: '浦江农商银行访客系统',
    H5Url: 'http://www.96time.cn/visitorH5?state=5a0a0',
    publicUrl: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx3f0d22136091bb20&redirect_uri=http://www.96time.cn/visitorH5&response_type=code&scope=snsapi_userinfo&wechat_redirect&state=5a0a0'
  }
}

import vant from 'vant'
export function getUnitInfo() {
  console.log('visitorH5_unitId=' + localStorage.getItem('visitorH5_unitId'))
  const unitId = Number(localStorage.getItem('visitorH5_unitId'))
  if (unitId !== 1 && unitId !== 2 && unitId !== 3 && unitId !== 4 && unitId !== 5) {
    vant.Toast('获取单位信息失败')
    return false
  } else {
    return list[unitId]
  }
}

